import Vue from 'vue'
import alert from './alert.vue'

const homeBox = Vue.extend(alert)

alert.install = function (data) {
  // eslint-disable-next-line new-cap
  let instance = new homeBox({data}).$mount()

  document.body.appendChild(instance.$el)

  Vue.nextTick(() => {
    instance.flag = true
  })
  return instance
}

export default alert
